﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UcProductDetail.ascx.cs" Inherits="TheHeGeoCommercial.Commercial.UcProductDetail" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxImageSlider" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxDataView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxFormLayout" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxHeadline" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxSpreadsheet.v14.1, Version=14.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxSpreadsheet" tagprefix="dx" %>
 <%@ Register TagPrefix="ajaxToolkit" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit"%>
<style type="text/css">
    .auto-style2 { width: 400px; }

    .auto-style3 { height: 23px; }
    .auto-style4 {
        width: 489px;
    }
    .hyp {
        text-decoration:none;
    }
</style>
<script type="text/javascript">
   <%-- function ShowModalPopup() {
        var url = $get("<%=txtUrl.ClientID %>").value;
        url = url.split('v=')[1];
        $get("video").src = "//www.youtube.com/embed/" + url
        $find("mpe").show();
        return false;
    }--%>
    function HideModalPopup() {
        $get("video").src = "";
        $find("mpe").hide();
        return false;
    }
    function grvForm_CustomButtonClick(s, e) {
        grvVideo.GetRowValues(e.visibleIndex, 'VideoLink', RowValues);
       
    }
    function RowValues(values) {
        <%--var url = $get("<%=txtUrl.ClientID %>").value;--%>
       var url = values.split('v=')[1];
        $get("video").src = "//www.youtube.com/embed/" + url;
        $find("mpe").show();
        return false;}
</script>
<div style="margin: 5px 5px 5px 5px; width: 98%">
    <table style="width: 100%;">
        <tr>
            <td class="auto-style2">
                <dx:ASPxImageSlider ID="ASPxImageSlider1" runat="server" BinaryImageCacheFolder="~\Thumb\" Height="400px" Width="400px">
                </dx:ASPxImageSlider>
            </td>
            <td>
                <dx:ASPxMemo ID="txtDetail" runat="server" Height="400px" Width="100%" Font-Size="12pt" Text="123" Font-Bold="False" Font-Names="Times New Roman" ForeColor="Black">
                    <Border BorderStyle="None" />
                </dx:ASPxMemo>
            </td>
        </tr>

    </table>
    
    <table style="height: 43px; width: 100%;">
        <tr>
            <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="3">
                <dx:ASPxPanel ID="ASPxPanel2" runat="server" BackColor="#CCCCCC" Height="5px" Width="100%">
                </dx:ASPxPanel>
            </td>
        </tr>
        <tr>
           <%-- <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>--%>
        </tr>
    </table>
    
    <table  >
        <tr>
           <td>
                <dx:ASPxHeadline ID="ASPxHeadline1" runat="server" HeaderText="Video giới thiệu sản phẩm"></dx:ASPxHeadline>
            </td>
        </tr>
        
        <tr>
            <td>
                <dx:ASPxGridView ID="grvVideo" runat="server" ClientInstanceName="grvVideo" style="margin-bottom:15px;" AutoGenerateColumns="False"   KeyFieldName="Id" Width="332px" >
                     <ClientSideEvents CustomButtonClick="grvForm_CustomButtonClick" />
                    
                    <Columns>
                    <dx:GridViewDataTextColumn Caption="Id" FieldName="Id" Width="150px" VisibleIndex="0" Visible="False" >
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <CellStyle HorizontalAlign="Center" VerticalAlign="Middle"> 
                        </CellStyle>
                    </dx:GridViewDataTextColumn> 
                 
                    <dx:GridViewDataTextColumn Caption="Link video" FieldName="VideoLink" VisibleIndex="1" Visible="False">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <CellStyle HorizontalAlign="Left" VerticalAlign="Middle">
                        </CellStyle>
                    </dx:GridViewDataTextColumn>
                   <dx:GridViewDataTextColumn Caption="Tên video" FieldName="VideoName" VisibleIndex="2" Width="250px">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <CellStyle HorizontalAlign="Left" VerticalAlign="Middle">
                        </CellStyle>
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewCommandColumn Name="cmdBtn" ShowInCustomizationForm="False" VisibleIndex="3" ButtonType="Link" Caption="" Width="80px" >
                        <CustomButtons>
                            
                            <dx:GridViewCommandColumnCustomButton ID="btnView" Text="Xem Video" Visibility="AllDataRows">
                              
                            </dx:GridViewCommandColumnCustomButton>
                        </CustomButtons>
                            <HeaderStyle  HorizontalAlign="Center" VerticalAlign="Middle" />
                    </dx:GridViewCommandColumn> 
                </Columns>
                <SettingsPager PageSize="15">
                </SettingsPager>
                <Settings HorizontalScrollBarMode="Auto"/>
                </dx:ASPxGridView>
            </td>
        </tr>
    </table>
    <div>
        <dx:ASPxPanel ID="ASPxPanel1" runat="server" BackColor="#CCCCCC" Height="5px" Width="100%">
         </dx:ASPxPanel>
    </div>
    
    <table style="width: 100%;">
        <tr>
            <td>
                <dx:ASPxLabel ID="ASPxLabel1" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="#C4A300" Text="Thông số kỹ thuật" Font-Names="Times New Roman">
                </dx:ASPxLabel>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" Theme="Aqua" Width="100%" Font-Bold="False" Font-Names="Times New Roman" Font-Size="12pt" ForeColor="Black">
                    <Columns>
                        <dx:GridViewDataTextColumn FieldName="lbl" VisibleIndex="0">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="txt" VisibleIndex="1">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsPager Mode="ShowAllRecords">
                    </SettingsPager>
                    <Settings ShowColumnHeaders="False" ShowGroupButtons="False" ShowHeaderFilterBlankItems="False" />
                    <SettingsDataSecurity AllowDelete="False" AllowEdit="False" AllowInsert="False" />
                </dx:ASPxGridView>
            </td>
        </tr>
        <tr>
            <td class="auto-style3">
                <dx:ASPxMemo ID="txtNote" runat="server" BackColor="White" Height="100px" Width="100%" Font-Bold="False" Font-Names="Times New Roman" Font-Size="11px" ForeColor="Black">
                    <BorderLeft BorderStyle="None" />
                    <BorderTop BorderStyle="None" />
                    <BorderRight BorderStyle="None" />
                    <BorderBottom BorderColor="#CCCCCC" BorderWidth="3px" />
                </dx:ASPxMemo>
            </td>
        </tr>
    </table>
    
    <table style="width: 100%;">
        <tr>
            <td class="auto-style4">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2">
                <dx:ASPxLabel ID="ASPxLabel2" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="#C4A300" Text="Sản phẩm cùng loại" Font-Names="Times New Roman">
                </dx:ASPxLabel>
            </td>
        </tr>
        <tr>
            <td class="auto-style4">
                <dx:ASPxHyperLink ID="hbl1" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
            <td>
                <dx:ASPxHyperLink ID="hbl2" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
        </tr>
        <tr>
            <td class="auto-style4">
                <dx:ASPxHyperLink ID="hbl3" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
            <td>
                <dx:ASPxHyperLink ID="hbl4" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
        </tr>
        <tr>
            <td class="auto-style4">
                <dx:ASPxHyperLink ID="hbl5" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
            <td>
                <dx:ASPxHyperLink ID="hbl6" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
        </tr>
        <tr>
            <td class="auto-style4">
                <dx:ASPxHyperLink ID="hbl7" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
            <td>
                <dx:ASPxHyperLink ID="hbl8" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
        </tr>
        <tr>
            <td class="auto-style4">
                <dx:ASPxHyperLink ID="hbl9" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
            <td>
                <dx:ASPxHyperLink ID="hbl10" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
        </tr>
        <tr>
            <td class="auto-style4">
                <dx:ASPxHyperLink ID="hbl11" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
            <td>
                <dx:ASPxHyperLink ID="hbl12" runat="server" Font-Bold="False" Font-Size="12pt" ForeColor="#666666" CssClass="hyp" Font-Names="Times New Roman" />
            </td>
        </tr>
    </table>
</div>



<div>

<asp:LinkButton ID="lnkDummy" runat="server"></asp:LinkButton>

 <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajaxToolkit:ToolkitScriptManager>

<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" BehaviorID="mpe" runat="server"
    PopupControlID="pnlPopup" TargetControlID="lnkDummy" BackgroundCssClass="modalBackground" CancelControlID = "btnClose">
</ajaxToolkit:ModalPopupExtender>

<asp:Panel ID="pnlPopup" runat="server" CssClass="modalPopup" Style="display: none">
    <div class="header">
       Video
    </div>
    <div class="body">
        <iframe id = "video" width="640" height="480" frameborder="0" allowfullscreen></iframe>
        <br />
        <br />
        <asp:Button ID="btnClose" runat="server" Text="Close" OnClientClick="return HideModalPopup()"/>
    </div>
</asp:Panel>
</div>